//#define __FORCE_TRACE__
//#define __FORCE_DEBUG__
//#define __FORCE_INFO__
#define THIS_FILE "management\fn_loadMarkers.sqf"
#include <tmf_constants.h>
#include <tmf_macros.h>

TRACE_1("Start",_this);
TMFPROFILERSTART;
private ["_instances","_jip_instance","_jip_tasks","_x","_instance","_marker_params","_loaded"];

_loaded = 0;
_instances = JIPGETVAR(QGVAR(MISSION_INSTANCES),[]);
TRACE_1("Instances",_instances);
{
	_instance = _x;
	_jip_instance = [_instance] call FFUNC(getMissionInstance);
	_jip_markers = [_jip_instance, TMF_HK_MISSION_MARKERS,[],THIS_FILE] call FFUNC(hashGet);
	TRACE_1("Tasks",_jip_markers);
	{
		_marker_params = _x select 1;
		[_marker_params,_instance, false] spawn FFUNC(updateMarker);
		INC(_loaded);
	} foreach _jip_markers;
} foreach _instances;

INFO_1("End",_loaded);
TMFPROFILERSTOP;
